package net.sureon.dao;

import java.util.List;

public interface ApplicationDAO {
	// 根据ID获取一个Application对象
	public Application getApplicationByID(long companyID, long applicationID);

	// 保存一条考勤
	public long insertApplication(Application application);

	/**
	 * 用户未审核的申请(Pending/Rejected)
	 */
	public List<Application> getApplicationByUserNotReview(long companyID,
			long userID,int skipResults,int maxResults);

	/**
	 * 用户审核过的申请（包括审核不通过和审核通过/NotApproved,Approved）
	 */
	public List<Application> getApplicationByUserReview(long companyID,
			long userID, int skipResults, int maxResults);

	/**
	 * 未审核的下属申请(Pending)
	 */

	public List<Application> getApplicationByGroupNotReview(long companyID, List<Long> idsAsList, int skipResults, int maxResults);
	
	/**
	 * 审核过的下属申请（包括 NotApproved和Approved）
	 */

	public List<Application> getApplicationByGroupReview(long companyID, List<Long> idsAsList, int skipResults, int maxResults);

	
	/**
	 * 
	 * @param applicationID
	 *            申请编号
	 * @param reviewDate
	 *            审核日期
	 * @param reviewedBy
	 *            审核人编号
	 * @param reviewNote
	 *            审核结果原因
	 * @param status
	 *            审核状态
	 * @return
	 */
	public int updateApplication(long companyID, long applicationID, java.util.Date reviewDate,
			long reviewedBy, String reviewNote, String status);
	
	public int editApplication(long companyID, long applicationID, String category, java.util.Date startDate, java.util.Date endDate, float sumTime, String note, java.util.Date submitDate);

	/**
	 * 删除一条申请
	 * 
	 * @param applicationID
	 *            申请编号
	 * @return 被删除的申请编号
	 */
	public int deleteApplication(long companyID, long applicationID);

}
